package recite.word.client.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import recite.word.client.service.IIndexService;
import recite.word.client.vo.index.IndexGetDataVO;
import recite.word.service.base.common.response.ResponseResult;

@RestController()
@RequestMapping("/client/index")
@Api(tags = "客户端【主页】controller")
public class IndexController {
    @Autowired
    private IIndexService indexService;

    @PostMapping("/getData")
    @ApiOperation("获取首页数据")
    public ResponseResult<IndexGetDataVO> getData(){
        IndexGetDataVO ans = indexService.getData();
        return ResponseResult.success(ans);
    }
}
